<?php
require_once("../connection.php");

$gpid = $_POST['gpid'];
$fbid = $_POST['fbid'];
$action = $_POST['action'];

if($action == "make")
{
	$res = mysql_query("UPDATE site_group_members SET `mod`='1' WHERE `gpid`='$gpid' AND `fbid`='$fbid'");
	if(!$res) echo  mysql_error();
}
else if($action == "rem")
{
	$res = mysql_query("UPDATE site_group_members SET `mod`='0' WHERE `gpid`='$gpid' AND `fbid`='$fbid'");
	if(!$res) echo  mysql_error();
}

?>